package com.eva.learn.concurrent.thinkInJava;

import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 继承线程池执行器，实现后台线程(效果同DaemonFromFactory中使用DaemonThreadFactory创建线程执行器)
 * 继承线程池执行器，调用父类构造方法
 * 
 * @author Evain.C
 *
 */
public class DaemonThreadPoolExecutor extends ThreadPoolExecutor {

	public DaemonThreadPoolExecutor() {
		super(0, Integer.MAX_VALUE, 60l, TimeUnit.SECONDS,
				new SynchronousQueue<Runnable>(), new DaemonThreadFactory());
	}

}
